package pl.vanta.utils.gui.tables;

import javax.swing.table.TableCellRenderer;

public class ColumnDescription
{
	private String				name;

	private Class<?>			clazz;

	private boolean				resizable;

	private int					size;

	private boolean				sortable;

	private TableCellRenderer	renderer;

	public ColumnDescription(String name, Class<?> clazz, boolean resizable, int size)
	{
		this(name, clazz, resizable, size, true, null);
	}

	public ColumnDescription(String name, Class<?> clazz, boolean resizable, int size, boolean sortable)
	{
		this(name, clazz, resizable, size, sortable, null);
	}

	public ColumnDescription(String name, Class<?> clazz, boolean resizable, int size, boolean sortable,
			TableCellRenderer renderer)
	{
		this.name = name;
		this.clazz = clazz;
		this.resizable = resizable;
		this.size = size;
		this.sortable = sortable;
		this.renderer = renderer;
	}

	public String getName()
	{
		return this.name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public Class<?> getClazz()
	{
		return this.clazz;
	}

	public void setClazz(Class<?> clazz)
	{
		this.clazz = clazz;
	}

	public boolean isResizable()
	{
		return this.resizable;
	}

	public void setResizable(boolean resizable)
	{
		this.resizable = resizable;
	}

	public int getSize()
	{
		return this.size;
	}

	public void setSize(int preferredSize)
	{
		this.size = preferredSize;
	}

	public boolean isSortable()
	{
		return this.sortable;
	}

	public void setSortable(boolean sortable)
	{
		this.sortable = sortable;
	}

	public TableCellRenderer getRenderer()
	{
		return this.renderer;
	}

	public void setRenderer(TableCellRenderer renderer)
	{
		this.renderer = renderer;
	}
}